
from .circle import get_circle
from .write2file import w2f
from .transformation_value import p2tf_val
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

def start_test():
    x = []
    y = []
    z = []

    circle = get_circle()

    for i in range(0, len(circle)):
        x.append(round(circle[i]['x'], 3))
        y.append(round(circle[i]['y'], 3))
        z.append(round(circle[i]['z'], 3))

    plt.scatter(x,y)


    fg2 = plt.figure()
    ax = Axes3D(fg2)
    ax.scatter(x,y,z)
    # ax.set_xlim(-200, 0);
    # ax.set_ylim(500, 1000);
    # ax.set_zlim(0, -100);
    ax.set_xlabel('X')
    ax.set_ylabel('Y')
    ax.set_zlabel('Z')
    plt.savefig('/Users/liyuxuan/Desktop/test.jpg')


    kwsk_point = p2tf_val(x, y, z)
    w2f(kwsk_point, 'circle.txt')




